<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>添加支付</title>
    {include file="common@default/common/header" /}
</head>

<body>
<div id="wrapper">
    <div class="wrapper wrapper-content animated fadeIn">
        <form class="form-horizontal" onsubmit="return app.submit(this,'addpay');" id="dtest" action="" method="post">
            <div class="form-group"><label class="col-sm-2 control-label">请选择支付类型</label>
                <div class="col-sm-10">
                <select class="form-control m-b" name="type" onchange="location.href='?type='+this.value">
                    <option value="">=请选择=</option>
                    {foreach $plugins as $key=>&$value} 
                        {if condition="$key == $type"}
                            <option value="{$key}" selected = "selected">{$value['shortdescription']}</option>
                        {else /}
                            <option value="{$key}">{$value['shortdescription']}</option>
                        {/if}
                    {/foreach} 
                </select> 
                </div>
            </div>
            {foreach $data as $key=>$value} 
            <div class="form-group"><label class="col-sm-2 control-label">{$key}</label>
                <div class="col-sm-10">
                {if condition="is_bool($value)"}
                    <input name="{$key}" type="checkbox" {if condition="$value==1"}checked="true" value="true"{else /}value="false"{/if}>
                {else /}
                    <input value="{$value}" name="{$key}" type="text" class="form-control">
                {/if}  
                </div>
            </div> 
            {/foreach}  

            <div class="form-group">
                <div class="col-sm-4 col-sm-offset-2">
                    <button class="btn btn-primary" type="submit">保存</button>
                      
                </div>
            </div>
        </form>
    </div>
</div>
{include file="common@default/common/footer"}
</body>
</html>